﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace Lil_Chipper
{
    [Serializable()]
    public sealed class StateData : ISerializable
    {
        public List<Story> Stories; // ID, # of chapters

        public StateData()
        {
            Stories = new List<Story>();
        }

        public StateData( StateData Other )
        {
            Stories = Other.Stories;
        }

        public StateData( SerializationInfo info, StreamingContext ctxt )
        {
            Stories = ( List<Story> ) info.GetValue( "Stories", typeof( List<Story> ) );
        }

        public void GetObjectData( SerializationInfo info, StreamingContext ctxt )
        {
            info.AddValue( "Stories", Stories );
        }
    };
}
